package com.sright.bcard.common.service.share.dto.content;

import com.sright.bcard.common.service.share.dto.BaseDomain;
import lombok.Data;

import java.util.Date;

@Data
public class MessageDTO extends BaseDomain {
    private static final long serialVersionUID = -7288988338934210941L;

    /**
     * 主键
     */
    private Long id;

    private Integer type;

    private Long memberId;

    private String name;

    private String company;

    private String mobile;

    private String job;

    private String email;

    private String weixin;

    private String referrer;

    private String content;

    private Integer status;

    private Integer isOpening;

    public String strOfSource() {
//        '来源 0小程序1官网2其他',
        switch (type) {
            case 0:
                return "小程序";
            case 1:
                return "官网";
            case 2:
                return "其他";
        }
        return "小程序";
    }

    public String strOfopenStatus() {
        if (isOpening == 1) {
            return "已经开通";
        }
        return "未开通";
    }

    public String strOfgetStatus() {
        switch (status) {
            case 0:
                return "待跟进";
            case 1:
                return "要开通";
            case 2:
                return "无意向";
            case 3:
                return "无效信息";
        }
        return "待跟进";
    }

    /**
     * 创建时间
     */
    private Date createdAt;

    public String strOfCreateDate() {
        return createdAt.toString();
    }

    /**
     * 修改时间
     */
    private Date updatedAt;

    /**
     * 删除标识
     */
    private Boolean isDelete;
}
